package org.eimac.imacquizz;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ImacQuizzActivity extends Activity {
	
	QuestionModel test;
	String [] responses = {"Rep 1"," Rep 2 "," Rep3"};
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button boutonFormation = (Button)findViewById(R.id.formation);
        Button boutonAdmission = (Button)findViewById(R.id.admission);
        Button boutonVie = (Button)findViewById(R.id.vie);
        Button boutonContact = (Button)findViewById(R.id.contact);
        Button boutonCredits = (Button)findViewById(R.id.credits);
        
      
        
        boutonFormation.setOnClickListener(new View.OnClickListener() { 
        
    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), QuestionActivity.class);
			myIntent.putExtra("rubric", "formation");		
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        boutonAdmission.setOnClickListener(new View.OnClickListener() {

    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), QuestionActivity.class);
			myIntent.putExtra("rubric", "admission");		
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        boutonVie.setOnClickListener(new View.OnClickListener() {

    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), QuestionActivity.class);
			myIntent.putExtra("rubric", "vie");
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        boutonContact.setOnClickListener(new View.OnClickListener() {

    	public void onClick(View v) {

			Intent myIntent = new Intent(v.getContext(), ContactActivity.class);
			myIntent.putExtra("rubric", "contact");
            startActivityForResult(myIntent, 0);
    	}

    	});
        
        boutonCredits.setOnClickListener(new View.OnClickListener() {

        	public void onClick(View v) {

    			Intent myIntent = new Intent(v.getContext(), CreditsActivity.class);
    			myIntent.putExtra("rubric", "credits");
                startActivityForResult(myIntent, 0);
        	}

        	});
        
    }
}